package com.wxisme.javaobserver;

import java.util.Observable;
import java.util.Observer;

public class ConcreteObserver implements Observer {
	private int myState;
	@Override
	public void update(Observable obs, Object obj) {
		setMyState(((ConcreteSubject)obs).getState());
		System.out.println("myState changed:" + myState);
	}
	
	public void setMyState(int myState) {
		this.myState = myState;
	}

	public int getMyState() {
		return myState;
	}
}
